import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      redirect:'/onboarding'
    },
    {
      path: '/onboarding',
      component:()=>import("../pages/onboarding/Index.vue")
    },
    {
      path: '/login',
      component:()=>import ('../pages/login/Index.vue')
    },
    {
      path: '/forget',
      component:()=>import ('../pages/forget/Index.vue')
    },
        {
      path: '/resetting',
      component:()=>import ('../pages/forget/Index.vue')
    },
    {
      path: '/preference',
      component:()=>import ('../pages/preference/Index.vue')
    },
    {
      path: '/setup',
      component:()=>import ('../pages/setup/Index.vue')
    },
    {
      path: '/home',
      component: () => import("../pages/home/Index.vue"),
      children:[
        {
          path:'release',
          component:()=>import('../pages/home/component/release/release.vue')
        },
        {
          path:'collect',
          component:()=>import('../pages/home/component/collect/collect.vue')
        },
        {
          path:'message',
          component:()=>import('../pages/home/component/message/message.vue')
        },
        {
          path:'empty',
          component:()=>import('../pages/home/component/empty/empty.vue')
        },
        {
          path:'mine',
          component:()=>import('../pages/home/component/mine/mine.vue')
        },
      ]
    },
    {
      path: '/:pathMatch(.*)*',
      name: 'NotFound',
      component: () => import("../pages/notfound/Index.vue")
    },
    {
      path: '/reset',
      component:()=>import ("../pages/reset/success.vue")
    },
  ]
})

export default router
